From e0586e3680282a4d57d6812b77c70c136902f920 Mon Sep 17 00:00:00 2001 From: Benjamin Otte Date: Fri, 30 Nov 2012 20:36:57 +0100 Subject: [PATCH] stylecontext: Expose a function to get at the current changes --- gtk/gtkstylecontext.c | 20 ++++++++++++++++++++ gtk/gtkstylecontextprivate.h | 3 +++ 2 files changed, 23 insertions(+) diff --git a/gtk/gtkstylecontext.c b/gtk/gtkstylecontext.c index a11ed5fd3e..d8245b971e 100644 --- a/gtk/gtkstylecontext.c +++ b/gtk/gtkstylecontext.c @@ -4512,6 +4512,26 @@ gtk_draw_insertion_cursor (GtkWidget *widget, draw_arrow); } +/** + * _gtk_style_context_get_changes: + * @context: the context to query + * + * Queries the context for the changes for the currently executing + * GtkStyleContext::invalidate signal. If no signal is currently + * emitted, this function returns %NULL. + * + * FIXME 4.0: Make this part of the signal. + * + * Returns: %NULL or the currently invalidating changes + **/ +const GtkBitmask * +_gtk_style_context_get_changes (GtkStyleContext *context) +{ + g_return_val_if_fail (GTK_IS_STYLE_CONTEXT (context), NULL); + + return context->priv->invalidating_context; +} + static AtkAttributeSet * add_attribute (AtkAttributeSet *attributes, AtkTextAttribute attr, diff --git a/gtk/gtkstylecontextprivate.h b/gtk/gtkstylecontextprivate.h index 0fd3f6bfe7..14d44c4495 100644 --- a/gtk/gtkstylecontextprivate.h +++ b/gtk/gtkstylecontextprivate.h @@ -27,6 +27,9 @@ G_BEGIN_DECLS void _gtk_style_context_set_widget (GtkStyleContext *context, GtkWidget *widget); +const GtkBitmask * + _gtk_style_context_get_changes (GtkStyleContext *context); + GtkCssValue * _gtk_style_context_peek_property (GtkStyleContext *context, guint property_id); double _gtk_style_context_get_number (GtkStyleContext *context, -- 2.30.2